import datetime
import time
from pymongo.connection import Connection

f = open('/home/ruxu/Templates/python/reader/pages', 'r')
mongoConnection = Connection()
db = mongoConnection.feeds
time = datetime.datetime.now()

#cleans database
db.link.remove({});

#inserts lines
for line in f:
  line = line.replace('"', '').replace('\n', '')
  db.link.insert({'link': line, 'time': time})

f.close()
